<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>添加员工信息页面</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <style>
        .bd-placeholder-img {
            font-size: 1.125rem;
            text-anchor: middle;
            -webkit-user-select: none;
            -moz-user-select: none;
            user-select: none;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>

    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
</head>
<body >
<!--style="background-color:olivedrab"-->
<div th:insert="~{frontpage::headtop}"></div>
<div class="container-fluid">
    <div class="row">
        <div th:insert="~{frontpage::textmenu}"></div>

        <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
            <h2>员工信息</h2>

            <div class="table-responsive">

            <form th:action="@{/employee/update}" method="post"  enctype="multipart/form-data">
                <div id="lists">
                    <div id="childlists">
                        <label for="reCID" >编号</label>
                        <td id="reCID">
                            <span th:text="${employee.id}"> </span>
                            <input type="hidden" name="id"  th:value="${employee.id}" />
                        </td>
                        <br>
                        <label for="fname">姓名</label>
                        <input type="text" id="fname" name="name" th:value="${employee.name}" />

                        <br>
                        <label for="photo1">当前头像</label>
                        <img id="photo1" th:src="@{/}+${employee.photo}" width="60">
                        <input type="hidden" name="photo" th:value="${employee.photo}" />

                        <label for="photo">选择头像</label>
                        <input type="file" width="" id="photo" name="img">

                        <label for="fsalary">工资</label>
                        <input type="text" id="fsalary" name="salary" th:value="${employee.salary}" />

                        <br>
                        <div class="form-group">
                            <label class="chosedepart">选择部门</label>
                            <div class="chosetext">
                                <label for="fsalary">所属部门</label>
                                <select  name="deid" th:value="${employee.departmentName}+${employee.deid}">
                                    <option  value="1">人事部</option>
                                    <option  value="2">市场部</option>
                                    <option  value="3">运营部</option>
                                    <option  value="4">111</option>
                                    <option  value="5">222</option>
                                </select>
                            </div>
                        </div>
                        <br>

                        <label for="birth">生日</label>
                        <input type="text" id="birth" name="birthday" th:value="${#dates.format(employee.birthday,'yyyy/MM/dd')}" />
                      <br>
                        <tr>
                            <td valign="middle" align="right">
                                性别:
                            </td>
                            <td valign="middle" align="left">
                                男
                                <input type="radio" class="inputgri" name="gender" value="1" checked="checked"/>
                                女
                                <input type="radio" class="inputgri" name="gender" value="0"/>
                            </td>
                        </tr>
                        <br>

                        <label for="telephone">电话</label>
                        <input type="text" id="telephone" name="telephone" th:value="${employee.telephone}">
<br>
                        <label for="email">邮箱</label>
                        <input type="text" id="email" name="epemail" th:value="${employee.epemail}">
                        </br>
                    </div>
                </div>
                <p>
                    <input type="submit" class="button" value="确认更新 &raquo;" />
                    <input th:href="@{/employee/lists}" type="submit" class="button" value="返回列表 &raquo;" />
                </p>

            </form>
        </div>
            <div id="footer">
                <div id="footer_bg">
                    Personnel management procedures
                </div>
            </div>
        </main>
    </div>
</div>

</body>
</html>